package com.kill.controller;

import com.common.entity.Kill;
import com.common.entity.Rsp;
import com.kill.service.KillServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
public class KillController {

    @Autowired
    private KillServiceImpl killService;

    @PostMapping("/addMany")
    public Rsp addMany(@RequestBody List<Kill> kills){
        return killService.addMany(kills);
    }

    @PostMapping("/findByGoodsId")
    public Rsp findByGoodsId(@RequestBody String goodsId){
        return killService.findByGoodsId(goodsId);
    }

    @PostMapping("/findAll")
    public Rsp findAll(){
        return killService.findAll();
    }
}
